package reflect;
import reflect.annotations.AutoRunMethod;
import java.lang.reflect.Method;
public class ReflectDeme11 {
    public static void main(String[] args) throws Exception {
        Class cls=Class.forName("reflect.Person");
        Method method=cls.getMethod("sayHello");
        if(method.isAnnotationPresent(AutoRunMethod.class)){
            System.out.println(method.getName()+"被标注了");
        }else{
            System.out.println(method.getName()+"没被标注");
        }
    }
}
